<template>

  <div class="mui-numbox" data-numbox-min='1'>
    <button class="mui-btn mui-btn-numbox-minus" type="button">-</button>
    <input id="test" class="mui-input-numbox" type="number" :value="this.initcount" @change="countChanged" ref="numbox" />
    <button class="mui-btn mui-btn-numbox-plus" type="button">+</button>
  </div>

</template>

<script>
import mui from "../../lib/mui/js/mui.min.js";
export default {
  mounted() {
    mui(".mui-numbox").numbox();
    console.log(this.maxCount);
  },
  methods: {
    countChanged() {
      var goodinfo={
        id:this.countId,
        count:this.$refs.numbox.value
      }
      console.log(goodinfo)
     this.$store.commit('changeCar',goodinfo)
    }
  },
  props:['initcount','countId']

 
  
};
</script>

<style>
</style>
